/*
 * *
 *  * Created with IntelliJ RustRover.
 *  * Description:
 *  * Copyright Author: ZhenYi
 *  * DateTime: 2024/2/14 下午5:10
 *
 */
use sea_orm::DatabaseConnection;
use tracing::log::info;
use crate::config::info::Master;

/// 连接pgsql数据库
pub async fn pgsql_connect(info:&Master) -> DatabaseConnection {
    info!("Connecting to pgsql");
    sea_orm::Database::connect(info.pgsql()).await.unwrap()
}